package com.rjt.data.controller;

import com.rjt.data.model.CuccInfo;
import com.rjt.data.model.CuccInfoPp;
import com.rjt.data.service.CuccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 7
 * @create 2019/2/15
 * @since 1.0.0
 */
@Controller
@ResponseBody
public class CuccController {
    @Autowired
    private CuccService cuccService;
    @PostMapping("post")
    public  void save(CuccInfo cuccInfo){
        try {
            cuccService.save(cuccInfo);
        }catch (Exception e){
            System.out.println("error");
        }
    }
    @PostMapping("postp")
    public  void saveP(CuccInfoPp cuccInfo){
        try {
            cuccService.saveP(cuccInfo);
        }catch (Exception e){
            System.out.println("error");
        }
    }
}